/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dieci.system;

import dieci.database.PersistentObject;

/**
 *
 * @author Blanco
 */
public class Client implements PersistentObject
{
    private String name;
    private int clientId;
    private String phoneNumber;
    private String email;
    private String address;    
    private String contactPerson;
    private String webSite;
    private int deleted;

    public Client()
    {
    }

    public Client(String name, String phoneNumber, String email, String adress, String contactPerson, String webSite, int deleted)
    {
        this.name = name;
        this.phoneNumber = phoneNumber;
        this.email = email;
        this.address = adress;
        this.contactPerson = contactPerson;
        this.webSite = webSite;
        this.deleted = deleted;
    }

    public Client(int clientId, String name, String phoneNumber, String email, String adress, String contactPerson, String webSite, int deleted)
    {
        this(name, phoneNumber, email, adress, contactPerson, webSite, deleted);
        this.clientId = clientId;
    }
    
    
    /**
     * Get the value of webSite
     *
     * @return the value of webSite
     */
    public String getWebSite()
    {
        return webSite;
    }

    /**
     * Set the value of webSite
     *
     * @param webSite new value of webSite
     */
    public void setWebSite(String webSite)
    {
        this.webSite = webSite;
    }


    /**
     * Get the value of contactPerson
     *
     * @return the value of contactPerson
     */
    public String getContactPerson()
    {
        return contactPerson;
    }

    /**
     * Set the value of contactPerson
     *
     * @param contactPerson new value of contactPerson
     */
    public void setContactPerson(String contactPerson)
    {
        this.contactPerson = contactPerson;
    }

    /**
     * Get the value of adress
     *
     * @return the value of adress
     */
    public String getAddress()
    {
        return address;
    }

    /**
     * Set the value of adress
     *
     * @param address new value of adress
     */
    public void setAddress(String address)
    {
        this.address = address;
    }


    
 
    
    /**
     * Get the value of email
     *
     * @return the value of email
     */
    public String getEmail() {
        return email;
    }

    /**
     * Set the value of email
     *
     * @param email new value of email
     */
    public void setEmail(String email) {
        this.email = email;
    }


    /**
     * Get the value of phoneNumber
     *
     * @return the value of phoneNumber
     */
    public String getPhoneNumber() {
        return phoneNumber;
    }

    /**
     * Set the value of phoneNumber
     *
     * @param phoneNumber new value of phoneNumber
     */
    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }


    /**
     * Get the value of clientCode
     *
     * @return the value of clientCode
     */
    public int getClientId() {
        return clientId;
    }

    /**
     * Set the value of clientCode
     *
     * @param clientCode new value of clientCode
     */
    public void setClientId(int clientId) {
        this.clientId = clientId;
    }

    
    /**
     * Get the value of name
     *
     * @return the value of name
     */
    public String getName() {
        return name;
    }

    /**
     * Set the value of name
     *
     * @param name new value of name
     */
    public void setName(String name) {
        this.name = name;
    }

    public int getDeleted() {
        return deleted;
    }

    public void setDeleted(int deleted) {
        this.deleted = deleted;
    }


    @Override
    public String toString(){
        return this.name;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (obj == null)
            return false;
        if (obj == this)
            return true;
        if (!(obj instanceof Client))
            return false;

        return ((Client)obj).getClientId()== this.clientId;
    }
}
